package com.northpool.operator.http.bean;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
import java.io.Serializable;
import java.util.List;

@XmlRootElement(name = "metadata")
@XmlAccessorType(XmlAccessType.FIELD)
public class AppMetadata implements Serializable {
    @XmlElement(name = "name")
    private String name;

    @XmlElement(name = "description")
    private String description;

    @XmlElement(name = "version")
    private String version;

    @XmlElement(name = "releaseDate")
    private String releaseDate;

    @XmlElement(name = "package")
    private String packageFile;

    @XmlElement(name = "document")
    private String documentFile;

    @XmlElementWrapper(name = "updateFeatures")
    @XmlElement(name = "feature")
    private List<String> updateFeatures;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getReleaseDate() {
        return releaseDate;
    }

    public void setReleaseDate(String releaseDate) {
        this.releaseDate = releaseDate;
    }

    public String getPackageFile() {
        return packageFile;
    }

    public void setPackageFile(String packageFile) {
        this.packageFile = packageFile;
    }

    public String getDocumentFile() {
        return documentFile;
    }

    public void setDocumentFile(String documentFile) {
        this.documentFile = documentFile;
    }

    public List<String> getUpdateFeatures() {
        return updateFeatures;
    }

    public void setUpdateFeatures(List<String> updateFeatures) {
        this.updateFeatures = updateFeatures;
    }

    @Override
    public String toString() {
        return "Metadata{" +
                "name='" + name + '\'' +
                ", description='" + description + '\'' +
                ", version='" + version + '\'' +
                ", releaseDate='" + releaseDate + '\'' +
                ", packageFile='" + packageFile + '\'' +
                ", documentFile='" + documentFile + '\'' +
                ", updateFeatures=" + updateFeatures +
                '}';
    }
}
